<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>素材列表</title>
<script type="text/javascript" th:src="@{/js/userConfig/menu_config.js}"></script>
</head>
<body>
<div id="pageDiv">
	 	<div>
	    	<el-breadcrumb separator-class="el-icon-arrow-right">
			  <el-breadcrumb-item>系统管理</el-breadcrumb-item>
			  <el-breadcrumb-item>菜单管理</el-breadcrumb-item>
			</el-breadcrumb>
		</div>
		<br/>
		<div>
			<template>
				<el-dialog title="新增看板配置" :visible.sync="dialogAdd" width="30%">
				    <el-form :inline="false" :model="mesPermission" ref="mesPermission" label-position="right" size="small" :rules="rules">
						  <el-form-item label="菜单描述" prop="desc">
						  	<el-col :span="15">
						    	<el-input v-model="mesPermission.desc" placeholder="菜单备注"></el-input>
						    </el-col>
						  </el-form-item>
						  <el-form-item label="菜单名称" prop="name">
						  	<el-col :span="15">
						       <el-input v-model="mesPermission.name" placeholder="菜单名称"></el-input>
						     </el-col>
						  </el-form-item>
						  <el-form-item label="菜单地址" prop="url">
						  	<el-col :span="15">
						       <el-input v-model="mesPermission.url" placeholder="菜单对应url"></el-input>
						     </el-col>
						  </el-form-item>
						  <el-form-item label="权限级别" prop="permission_int">
						  	<el-col :span="15">
						       <el-input v-model="mesPermission.permission_int" placeholder="菜单对应url"></el-input>
						     </el-col>
						  </el-form-item>
					</el-form> 
					<span slot="footer" class="dialog-footer">
					    <el-button size="mini" type="primary" @click="addForm('mesPermission')">确定</el-button>
					    <el-button size="mini" type="primary" @click="closeDialog()">取消</el-button>
					</span>
				</el-dialog>
				<el-button size="small" type="primary" @click="openAddDialog()">增加菜单</el-button>
			</template>
		</div>
		<br/>
		<div>
			<template>
				<!-- 表格 -->
				<el-table  v-loading="loading" :data="tableData" height="410"  style="width: 100%">
					<el-table-column prop="name" label="菜单名称" width="200"></el-table-column>
				    <el-table-column prop="url" label="保存地址" width="250"></el-table-column>
				    <el-table-column prop="desc" label="菜单描述" width="200"></el-table-column>
				    <el-table-column prop="permission_int" label="权限级别" width="150"></el-table-column>
				    <el-table-column label="操作">
				      <template slot-scope="scope">
				        <el-button size="mini" type="danger" plain @click.native.prevent="deleteConfig(scope.$index, scope.row,tableData)"> 删除</el-button> 
				      </template>
				    </el-table-column>
				</el-table>
				<!-- 分页 -->
		    	<el-pagination 
		    		background
		    		@size-change="handleSizeChange" 
		    		@current-change="handleCurrentChange" 
		    		:current-page="currentPage" 
		    		:page-sizes="[3,5,10]" 
		    		:page-size="pagesize" layout="total, sizes, prev, pager, next, jumper" 
		    		:total="totalSize">
    			</el-pagination>
			</template>
		</div>
	</div>
</body>
</html>